package com.example.interfaces.dto;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import com.example.infrastructure.excel.ExcelExportable;
import com.example.infrastructure.excel.ExcelImportable;
import cn.idev.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import jakarta.validation.constraints.*;

/**
 * 配送信息表 DTO
 *
 * @author wangal
 * @since 2025-07-25
 */
@Data
@Schema(name = "DeliveriesDTO", description = "配送信息表DTO")
public class DeliveriesDTO implements ExcelExportable, ExcelImportable {

    @Schema(description = "配送单号")
    @ExcelProperty("配送单号")
    @NotBlank(message = "配送单号不能为空")
    private String deliveryNo;
    
    @Schema(description = "处方ID")
    @ExcelProperty("处方ID")
    @NotNull(message = "处方ID不能为空")
    private Long prescriptionId;
    
    @Schema(description = "配送方式：1快递配送，2到店自取")
    @ExcelProperty("配送方式：1快递配送，2到店自取")
    private Byte deliveryType;
    
    @Schema(description = "收件人姓名")
    @ExcelProperty("收件人姓名")
    @NotBlank(message = "收件人姓名不能为空")
    private String receiverName;
    
    @Schema(description = "收件人电话")
    @ExcelProperty("收件人电话")
    @NotBlank(message = "收件人电话不能为空")
    private String receiverPhone;
    
    @Schema(description = "省份")
    @ExcelProperty("省份")
    @NotBlank(message = "省份不能为空")
    private String province;
    
    @Schema(description = "城市")
    @ExcelProperty("城市")
    @NotBlank(message = "城市不能为空")
    private String city;
    
    @Schema(description = "区县")
    @ExcelProperty("区县")
    @NotBlank(message = "区县不能为空")
    private String district;
    
    @Schema(description = "详细地址")
    @ExcelProperty("详细地址")
    @NotBlank(message = "详细地址不能为空")
    private String address;
    
    @Schema(description = "邮政编码")
    @ExcelProperty("邮政编码")
    @NotBlank(message = "邮政编码不能为空")
    private String postalCode;
    
    @Schema(description = "快递公司")
    @ExcelProperty("快递公司")
    @NotBlank(message = "快递公司不能为空")
    private String courierCompany;
    
    @Schema(description = "物流单号")
    @ExcelProperty("物流单号")
    @NotBlank(message = "物流单号不能为空")
    private String trackingNumber;
    
    @Schema(description = "配送费用")
    @ExcelProperty("配送费用")
    private BigDecimal deliveryFee;
    
    @Schema(description = "预计送达时间")
    @ExcelProperty("预计送达时间")
    private LocalDateTime estimatedTime;
    
    @Schema(description = "实际送达时间")
    @ExcelProperty("实际送达时间")
    private LocalDateTime actualTime;
    
    @Schema(description = "状态：0待发货，1已发货，2配送中，3已送达，4配送失败")
    @ExcelProperty("状态：0待发货，1已发货，2配送中，3已送达，4配送失败")
    private Byte status;
    
    @Schema(description = "备注")
    @ExcelProperty("备注")
    @NotBlank(message = "备注不能为空")
    private String remark;
    
    @Schema(description = "租户编号")
    @ExcelProperty("租户编号")
    @NotNull(message = "租户编号不能为空")
    private Long tenantId;
    
}
